package com.dmall.hello.tdd;

import java.util.List;

import static com.dmall.hello.tdd.PokerGame.Color.*;

public class PokerGame {

    enum Color {
        // 红桃
        HEART,
        // 黑桃
        SPADE,
        // 梅花
        CLUB,
        // 方片
        DIAMOND
    }

    static class Card {

        Color color;

        int point;

        private Card(Color color, int point) {
            this.color = color;
            this.point = point;
        }

        public static Card heartOf(int point) {
            return new Card(HEART, point);
        }

        public static Card spadeOf(int point) {
            return new Card(SPADE, point);
        }

        public static Card clubOf(int point) {
            return new Card(CLUB, point);
        }

        public static Card diamondOf(int point) {
            return new Card(DIAMOND, point);
        }
    }

    /**
     * 德州扑克游戏, 给出5张扑克牌, 判断牌型, 返回规则如下
     * 1 - ♦5 ♠6 ♠7 ♠8 ♠9 straight(顺子)
     * 2 - ♠4 ♠6 ♠7 ♠8 ♠9 flush(同花)
     * 3 - ♠5 ♠6 ♠7 ♠8 ♠9 straight flush(同花顺)
     * 0 - 其它
     */
    public int hand(List<Card> cards) {
        return 0;
    }
}
